package com.example.demo2.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

@RestController
@RequestMapping("service2")
public class WebController {

    @RequestMapping("getMsg")
    public String  getMsg(HttpSession session) {

        return session.getAttribute("msg").toString();
    }
}

